#ifndef _DATA_PLOT_H
#define _DATA_PLOT_H 1

#include <qwt_plot.h>
#include "buffer.h"

const int PLOT_SIZE = 501;      // 0 to 200

class DataPlot : public QwtPlot
{
    Q_OBJECT

public:
    DataPlot(QWidget* = NULL , Algoritmos* b = NULL);
	Algoritmos* datos;
	
public slots:
    void setTimerInterval(double interval);

protected:
    virtual void timerEvent(QTimerEvent *e);

private:
    void alignScales();

    double d_x[PLOT_SIZE]; 
    double d_a[PLOT_SIZE]; 
    double d_b[PLOT_SIZE];
    double d_c[PLOT_SIZE];
    
    double d_cursor1[PLOT_SIZE];
    double d_cursor2[PLOT_SIZE];        

    int d_interval; // timer in ms
    int d_timerId;
};

#endif
